<template>
  <div id="jdcouponslist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
           :row-class-name="tableRowClassName"  :border="true">

               
                <el-table-column label="名称"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.manor_title }}</span>
                    </template>
                </el-table-column>
                 <el-table-column label="操作" align='center' width="300px" fixed="right">
                    <template slot-scope="scope">
                        <el-button size="mini"  type="primary"  plain  @click="delect_but(scope.row)">删除</el-button> 
                    </template>
                </el-table-column>            
  
            </el-table>  


   </div>
</template>

<script>

export default {
   name: 'jdcouponslist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 290
  },
  mounted (){
    
  },
  methods: {
    
    delect_but(row){
      this.$confirm('是否删除?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
             this.post("/gdb_ticket/delTicket", {
                    tick_id:row.tick_id,
                }).then(res => {

                    if(res.error_code == 0){
                      this.open1(res.result,'success')  //提示框
                      this.$emit('up_list_fun')
                      this.$emit('up_tj_fun')
                      
                    }else {
                    this.open1(res.message,'warning')
                    }

              })
        })
    },



  }
}
</script>


<style scoped>

</style>